Skip to content

feat: add dispatch send intro#35

Merged
galligan merged 1 commit into
mainfrom
feat/send-intro
Jun 5, 2026
Merged

feat: add dispatch send intro#35
galligan merged 1 commit into
mainfrom
feat/send-intro

Conversation

@galligan

@galligan galligan commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Context

Codex-to-Codex coordination through dispatch needs a small, non-spoofable-at-the-CLI reply hint. We wanted dispatch send --intro instead of a user-supplied --from, with sender identity derived from the current Codex thread.

What changed

  • Adds SendInput.intro and applies it across send, steer, context, interject, and queued delivery.
  • Derives sender identity from CODEX_THREAD_ID, resolving it against the managed dispatch registry before prepending the intro.
  • Carries caller thread identity from CLI/MCP surfaces to the daemon via an internal caller_thread_id request field, because the daemon cannot read the caller process env.
  • Hides internal request metadata from derived CLI/MCP/schema projections via a shared schema helper.
  • Updates usage docs and first-party dispatch/dm skills to teach --intro.

Validation

  • uv run pytest tests/core/test_handlers.py tests/surfaces/test_derive_cli.py tests/surfaces/test_derive_mcp.py tests/surfaces/test_parity.py tests/surfaces/test_mcp_routing.py tests/core/test_examples.py -q -> 84 passed
  • just check -> ruff, format, mypy, pytest 196 passed / 9 deselected, build, and package content check passed
  • uv run dispatch schema send | jq '.input.properties | has("intro"), has("caller_thread_id")' -> true, false
  • Live isolated smoke with temp DISPATCH_HOME:
    • created sender and target managed lanes with --no-send
    • ran CODEX_THREAD_ID=<sender-id> uv run dispatch send <target-ref> ... --intro --json
    • send accepted, daemon audit log showed [dispatch] From ... (<ref>). Use \dispatch send "..."` to reply.` prepended

Risks

  • --intro intentionally fails if the current Codex thread is not managed by dispatch. That is the right current behavior; unmanaged/self-registration can come later.
  • The internal caller_thread_id is hidden from public schemas and CLI help, but direct local control-socket callers remain trusted local peers.

galligan commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@galligan galligan marked this pull request as ready for review June 5, 2026 21:23

galligan commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

Merge activity

  • Jun 5, 9:24 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jun 5, 9:24 PM UTC: @galligan merged this pull request with Graphite.

@galligan galligan merged commit ee61d18 into main Jun 5, 2026
5 checks passed
@galligan galligan deleted the feat/send-intro branch June 5, 2026 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant